package net.mikoo.seals.model;

public enum VerifyResult {

	ACCESS(0, "通过"),
	REJECT(1, "不通过");
	
	private Integer value;
	
	private String name;

	private VerifyResult(int value, String name) {
		this.value = value;
		this.name = name;
	}

	public Integer getValue() {
		return value;
	}

	public String getName() {
		return name;
	}
	
	public static VerifyResult fromResultValue(Integer value) {
		for(VerifyResult ele : VerifyResult.values()) {
			if(ele.value == value) {
				return ele;
			}
		}
		return null;
	}
}
